<article class="module width_full">
	<header><h3><?php  echo __('Medicamentos'); ?></h3></header>
	<table class="tablesorter" cellspacing="0">
		<thead>
			<tr>
				<th><?php echo __('Id'); ?></th>

				<th><?php echo __('Nome'); ?></th>

				<th><?php echo __('Marca'); ?></th>

				<th><?php echo __('Composicao Quimica'); ?></th>

				<th><?php echo __('Medicamento Generico'); ?></th>

				<th><?php echo __('User'); ?></th>

				<!--<th><?php echo __('Created'); ?></th>-->

				<th><?php echo __('Modified'); ?></th>

				<th><?php echo __('Actions'); ?></th>

			</tr>
		</thead>
		<tbody>
			<tr>
				<td>
					<?php echo h($drug['Drug']['id']); ?>
					&nbsp;
				</td>
				<td>
					<?php echo h($drug['Drug']['nome']); ?>
					&nbsp;
				</td>
				<td>
					<?php echo h($drug['Drug']['marca']); ?>
					&nbsp;	
				</td>
				<td>
					<?php echo h($drug['Drug']['composicao_quimica']); ?>
					&nbsp;
				</td>
				<td>
					<?php echo h($drug['Drug']['medicamento_generico']); ?>
					&nbsp;
				</td>
				<td>
					<?php echo $this->Html->link($drug['User']['name'], array('controller' => 'users', 'action' => 'view', $drug['User']['id'])); ?>
					&nbsp;
				</td>	
				<!--<td>
					<?php echo h($drug['Drug']['created']); ?>
					&nbsp;
				</td>-->
				<td>
					<?php echo h($drug['Drug']['modified']); ?>
					&nbsp;
				</td>
				<td class="actions">
					<ul>
					<!--<?php echo $this->Html->link(__('New Drug'), array('action' => 'add')); ?> -->
					<a href="<?php echo $this->Html->url(array('action' => 'edit',  $drug['Drug']['id'])) ?>"><img src="<?php echo $this->Html->url('/html5/images/icn_edit.png') ?>" /></a>
					<?php echo html_entity_decode($this->Form->postLink("<img src=\"".$this->Html->url('/html5/images/icn_trash.png')."\" />", array('action' => 'delete',  $drug['Drug']['id']), null, __('Are you sure you want to delete # %s?', $drug['Drug']['id']))); ?>

					</ul>
				</td>
			</tr>
		</tbody>
</table>
</article><!-- end of user view article -->

<article class="module width_full">
	<header><h3><?php echo __('Medicamentos relacionados as Vendas'); ?></h3></header>
	<?php if (!empty($drug['SalesDrug'])): ?>
	<table class="tablesorter" cellspacing="0">
		<thead>
			<tr>
				<th><?php echo __('Id'); ?></th>
				<th><?php echo __('Date'); ?></th>
				<th><?php echo __('User Id'); ?></th>
				<th><?php echo __('Modified'); ?></th>
				<th><?php echo __('Created'); ?></th>
				<th class="actions"><?php echo __('Actions'); ?></th>
			</tr>
		</thead>
			<tbody>
				<?php
					$i = 0;
					foreach ($drug['SalesDrug'] as $salesDrug): ?>
					<tr>
						<td><?php echo $salesDrug['id']; ?></td>
						<td><?php echo $salesDrug['date']; ?></td>
						<td><?php echo $salesDrug['user_id']; ?></td>
						<td><?php echo $salesDrug['modified']; ?></td>
						<td><?php echo $salesDrug['created']; ?></td>
						<td class="actions">
							<a href="<?php echo $this->Html->url(array('action' => 'edit',  $drug['Drug']['id'])) ?>"><img src="<?php echo $this->Html->url('/html5/images/icn_edit.png') ?>" /></a>
							<?php echo html_entity_decode($this->Form->postLink("<img src=\"".$this->Html->url('/html5/images/icn_trash.png')."\" />", array('action' => 'delete',  $drug['Drug']['id']), null, __('Are you sure you want to delete # %s?', $drug['Drug']['id']))); ?>
						</td>
					</tr>
				<?php endforeach; ?>
		</tbody>
	</table>
	<?php endif; ?>
</article><!-- end of user view article -->
<!--<div class="related">
	</table>
	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Sales Drug'), array('controller' => 'sales_drugs', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>-->
